From: Matthew Barnes Date: Thu, 8 Jan 2015 19:11:12 +0000 (-0500) Subject: pull: Prioritize fetching metadata objects over content objects X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~996 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4b5b450d5c679b1e5d1986e2b0e87aa14b3d422c;p=ostree.git pull: Prioritize fetching metadata objects over content objects --- diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 296d23eb..efe87f67 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -29,6 +29,9 @@ #include "ostree-metalink.h" #include "otutil.h" +#define OSTREE_REPO_PULL_CONTENT_PRIORITY (OSTREE_FETCHER_DEFAULT_PRIORITY) +#define OSTREE_REPO_PULL_METADATA_PRIORITY (OSTREE_REPO_PULL_CONTENT_PRIORITY - 100) + typedef struct { OstreeRepo *repo; OstreeRepoPullFlags flags; @@ -1123,7 +1126,8 @@ enqueue_one_object_request (OtPullData *pull_data, _ostree_fetcher_request_uri_with_partial_async (pull_data->fetcher, obj_uri, expected_max_size, - OSTREE_FETCHER_DEFAULT_PRIORITY, + is_meta ? OSTREE_REPO_PULL_METADATA_PRIORITY + : OSTREE_REPO_PULL_CONTENT_PRIORITY, pull_data->cancellable, is_meta ? meta_fetch_on_complete : content_fetch_on_complete, fetch_data); soup_uri_free (obj_uri);